<html>
<head><title>Upload Example</title></head>
<body>

<script type="text/javascript">

var counter = 0;

function startProgress(){
    document.getElementById("progressouter").style.display="block";
    fire();
}

function fire(){
   if (counter < 101){
     document.getElementById("progressinner").style.width = counter+"%";
     counter++;
     setTimeout("fire()",100);
   }
}


</script>


<div id="progressouter" style="width: 500px; height: 20px; border: 6px solid red; display:none;">
   <div id="progressinner" style="position: relative; height: 20px; background-color: purple; width: 0%; "> </div>
</div>

<span onclick="startProgress()">Start me up!</span>

</body>
</html>